<?php
/**
 * 配置
 * 
 * 淘宝图片尺寸(从小到大)
 * 	_40x40.jpg
 * 	_sum.jpg
 * 	_100x100.jpg
 * 	_160x160.jpg
 * 	_b.jpg
 * 	_310x310.jpg
 * 
 * 淘宝商店图标的前缀为：http://logo.taobaocdn.com/shop-logo
 * 
 * @version $Id: main.php 613 2012-12-27 02:25:06Z linsir123 $
 */
return array(
	'urlMode' => URL_REWRITE,
	'controllerDefault' => 'site',
	'controllerMiss' => array('site', 'miss'),
	'appSubs' => array(
		'admin' => array(
			'import' => array()
		)
	),
	'appDefault' => array(
		'alias' => 'site',
		'list' => array(
			'list' => array(),
			'single' => array(),
		)
	),
	'view' => array('engine'=>'Smarty','caching'=>1, 'cache_lifetime'=>3600*24*1),
	'urlRoutes' => array(
		// 分类(普通)
		array(
			'pattern' => '/^list\/([^\-]+)-(\d+)\/([^\-]+)-([^\-]+)\/(\d+)-(\d+)$/i',
			'keys' => array('pinyin','cid','pinyin_keyword','keyword','sort', 'p'),
			'route' => 'list/index'
		),
		// 分类(折扣)
		array(
			'pattern' => '/^zhe\/([^\-]+)-([^\-]+)\/(\d+)-(\d+)$/i',
			'keys' => array('pinyin_keyword','keyword', 'sort', 'p'),
			'route' => 'zhe/index'
		),
		// 商品
		array(
			'pattern' => '/^item\/(\d+)\/(\d+)$/i',
			'keys' => array('iid', 'attach'),
			'route' => 'item/info'
		),
		// 页面跳转
		array(
			'pattern' => '/^goto\/(\S+)\/(.*)$/i',
			'keys' => array('action', 'data'),
			'route' => 'site/redirect'
		),
		// 店铺街
		array(
			'pattern' => '/^shops\/([^\-]+)-(\d+)\/([^\-]+)-([^\-]+)\/(\d+)-(\d+)$/i',
			'keys' => array('pinyin','cid','pinyin_keyword','keyword','sort', 'p'),
			'route' => 'shops/index'
		),
		// 店铺
		array(
			'pattern' => '/^shop\/([^\-]+)-(\d+)$/i',
			'keys' => array('nick','seller_id'),
			'route' => 'shop/info'
		),
	),
	'dsn' => array(
		array('127.0.0.1', 'root', '123456', 'e35go'),
	),
	'dbTable' => array(
		array('prefix' => 'e35go_'),
	),
);
